cmake_minimum_required(VERSION 2.8.3)
project(ros_imagemsg)

## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  roslib
  cv_bridge
  image_transport
  roscpp
  sensor_msgs
  std_msgs
)
find_package(OpenCV REQUIRED)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)

## Generate messages in the 'msg' folder
# add_message_files(
#   FILES
#   Message1.msg
#   Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
#   FILES
#   Service1.srv
#   Service2.srv
# )

## Generate actions in the 'action' folder
# add_action_files(
#   FILES
#   Action1.action
#   Action2.action
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
#   DEPENDENCIES
#   sensor_msgs#   std_msgs
# )

catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES ros_imagemsg
#  CATKIN_DEPENDS cv_bridge image_transport roscpp sensor_msgs std_msgs
#  DEPENDS system_lib
)

include_directories(include ${catkin_INCLUDE_DIRS})
include_directories(include ${OpenCV_INCLUDE_DIRS})

INCLUDE_DIRECTORIES(/opt/ros/kinetic/include)
link_directories(/opt/ros/kinetic/lib)


add_executable(my_publisher src/my_publisher.cpp)
target_link_libraries(my_publisher ${catkin_LIBRARIES} ${OpenCV_LIBS})

add_executable(my_subscriber src/my_subscriber.cpp)
target_link_libraries(my_subscriber ${catkin_LIBRARIES} ${OpenCV_LIBS})


add_executable(imageturn src/imageturn.cpp)
target_link_libraries(imageturn ${catkin_LIBRARIES} ${OpenCV_LIBS})

add_executable(imageturn2 src/imageturn2.cpp)
target_link_libraries(imageturn2 ${catkin_LIBRARIES} ${OpenCV_LIBS})

add_executable(imageturn3 src/imageturn3.cpp)
target_link_libraries(imageturn3 ${catkin_LIBRARIES} ${OpenCV_LIBS})




add_library(image_trans src/image_trans.cpp)

add_executable(image_transport_node src/image_transport_node.cpp)
target_link_libraries(image_transport_node image_trans ${catkin_LIBRARIES} ${OpenCV_LIBS})

